package com.java.zhuiyun.api.playerLoginLogs.controller;

import com.java.zhuiyun.annotation.OptLog;
import com.java.zhuiyun.api.playerLoginLogs.service.PlayerLoginLogsService;
import com.java.zhuiyun.common.response.CommonConstants;
import com.java.zhuiyun.common.response.CommonResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName PlayerLoginLogsController
 * @Description TODO 每日活跃量
 * @Author WX
 * @Date 2023/9/19 9:57
 **/
@CrossOrigin
@RestController
@RequestMapping("/PlayerLoginLogs")
public class PlayerLoginLogsController {
    @Autowired
    private PlayerLoginLogsService playerLoginLogsService;

    /*
    * @Author WX
    * @Description 查询活跃量
    * @Date 2023/9/19 14:55
    * @Return
    * @param null
    */
    @GetMapping("/selectPlayerLoginLogs")
    @ApiOperation(value = "查询活跃量")
    @OptLog(modular = "每日活跃量",type = CommonConstants.SELECT,describe = "查询活跃量")
    public CommonResult selectPlayerLoginLogs () {
        return CommonResult.ok(playerLoginLogsService.selectPlayerLoginLogs());
    }

    /*
    * @Author WX
    * @Description 查询日周月活量
    * @Date 2023/9/20 9:23
    * @Return
    * @param null
    */
    @GetMapping("/getPlayerLoginLogs")
    @ApiOperation(value = "查询日周月活量")
    @OptLog(modular = "每日活跃量",type = CommonConstants.SELECT,describe = "查询日周月活量")
    public CommonResult getPlayerLoginLogs () {
        return CommonResult.ok(playerLoginLogsService.getPlayerLoginLogs());
    }
}
